class StorageUtil {
    static setItem(key, value) {
        localStorage.setItem(key, JSON.stringify(value));
    }

    static getItem(key) {
        const item = localStorage.getItem(key);
        try {
            return JSON.parse(item);
        } catch {
            return item;
        }
    }

    static removeItem(key) {
        localStorage.removeItem(key);
    }
}

export default StorageUtil; 